﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YXShop.IDAL.Templates
{
   public interface IFreeLabel
   {  

       #region Database Operation

       int Add(YXShop.Model.Templates.FreeLabel model);
       void Update(YXShop.Model.Templates.FreeLabel model);
       void Delete(int id);
       void DeleteAll(string ids);

       #endregion

       #region Data load
       ChangeHope.DataBase.DataByPage GetListAll();
       /// <summary>
       /// 查所有表名
       /// </summary>
       IList<YXShop.Model.Templates.FreeLabel.FreeLablelDBInfo> GetTables();
        /// <summary>
        /// 查表字段类型
        /// </summary>
       IList<YXShop.Model.Templates.FreeLabel.FreeLablelDBInfo> GetFields(string tableName);
        /// <summary>
        /// 根据ID查对象
        /// </summary>
       YXShop.Model.Templates.FreeLabel GetSingle(int id);
       /// <summary>
       /// 根据条件查集合
       /// </summary>
       List<YXShop.Model.Templates.FreeLabel> GetListByWhere(string where);
       /// <summary>
       /// 分页排序所有记录
       /// </summary>
       ChangeHope.DataBase.DataByPage GetListAll(string sql, int pagesize);
        /// <summary>
        /// 是否存在该标签
        /// </summary>
       bool IsRepeat(string Name, int id);
       #endregion
   }
}
